package com.eastfair.certificate.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.certificate.enumeration.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * <p>
 * 实体类
 * 制证订单
 * </p>
 *
 * @author ligang
 * @since 2022-08-02
 */
@Data
@ApiModel(value = "CertificateOrderUpdateDTO", description = "制证订单")
public class CertificateOrderDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface createOrder {
    }

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "主键id集合")
    private List<Long> ids;

    /**
     * 订单码
     */
    @ApiModelProperty(value = "订单码")
    @Size(max = 255, message = "订单码长度不能超过255")
    private String orderNumber;
    /**
     * 证件费
     */
    @ApiModelProperty(value = "证件费")
    private BigDecimal costMoney;
    /**
     * 超时费
     */
    @ApiModelProperty(value = "超时费")
    private BigDecimal overTimeMoney;
    /**
     * 押金
     */
    @ApiModelProperty(value = "押金")
    private BigDecimal depositMoney;
    /**
     * 退款金
     */
    @ApiModelProperty(value = "退款金")
    private BigDecimal returnMoney;
    /**
     * 退款方式:#{ONLINE:线上退款;OFFLINE:线下;}
     */
    @ApiModelProperty(value = "退款方式:#{ONLINE:线上退款;OFFLINE:线下;}")
    private CertificateOrderReturnTypeEnum returnType;
    /**
     * 凭证号
     */
    @ApiModelProperty(value = "凭证号")
    @Size(max = 256, message = "凭证号长度不能超过256")
    private String voucherNumber;
    /**
     * 退款理由
     */
    @ApiModelProperty(value = "退款理由")
    @Size(max = 256, message = "退款理由长度不能超过256")
    private String returnLabel;
    /**
     * 公司id
     */
    @ApiModelProperty(value = "公司id")
    private Long companyId;
    /**
     * 是否领取
     */
    @ApiModelProperty(value = "是否领取")
    private Integer isDraw;
    /**
     * 是否开取发票
     */
    @ApiModelProperty(value = "是否开取发票")
    private Integer isTake;
    /**
     * 是否支付
     */
    @ApiModelProperty(value = "是否支付")
    private Integer isPay;
    /**
     * 是否打印小票
     */
    @ApiModelProperty(value = "是否打印小票")
    private Integer isPrintTake;
    /**
     * 是否取消
     */
    @ApiModelProperty(value = "是否取消")
    private Integer isCancel;
    /**
     * 是否退款
     */
    @ApiModelProperty(value = "是否退款")
    private Integer isReturn;
    /**
     * 是否可用，1是；0否
     */
    @ApiModelProperty(value = "是否可用，1是；0否")
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;
    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Long tenantId;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;
    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    private Long subsystemId;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    private Long exhibitionId;

    /**
     * 退款状态:#{AUTH:审核中;AUTH_SUCESS:审核成功;AUTH_FAIL:审核失败;}
     */
    @ApiModelProperty(value = "退款状态:#{AUTH:审核中;AUTH_SUCESS:审核成功;AUTH_FAIL:审核失败;}")
    private CertificateOrderAuthReturnStatusEnum authReturnStatus;

    @ApiModelProperty(value = "用户证件id集合")
    @NotEmpty(groups = {createOrder.class}, message = "用户证件id集合不能为空")
    private List<Long> certificateUserIdList;

    @ApiModelProperty(value = "退款审核是否通过")
    private Boolean returnIsAuth;

    /**
     * 领取人姓名
     */
    @ApiModelProperty(value = "领取人姓名")
    private String drawName;

    /**
     * 领取人手机号
     */
    @ApiModelProperty(value = "领取人手机号")
    private String drawMobile;

    /**
     * 领取人身份证号
     */
    @ApiModelProperty(value = "领取人身份证号")
    private String drawIdcard;
    /**
     * 证件类型:#{CAR:车证;PEOPLE:人证;POWER:机力车证;OTHER:其他证;}
     */
    @ApiModelProperty(value = "证件类型:#{CAR:车证;PEOPLE:人证;POWER:机力车证;OTHER:其他证;}")
    private CertificateOrderCertificateTypeEnum certificateType;

    @ApiModelProperty(value = "用户填写的制证信息")
    private CertificateUserDTO certificateUserDTO;


    /**
     * 创建开始时间
     */
    @ApiModelProperty(value = "创建开始时间")
    private LocalDateTime createTimeStartTime;

    /**
     * 创建结束时间
     */
    @ApiModelProperty(value = "创建结束时间")
    private LocalDateTime createTimeEndTime;

    /**
     * 退单状态:#{REFUND:退款中;NO_REFUND:未退款;YES_REFUND:已退款;}
     */
    @ApiModelProperty(value = "退单状态:#{REFUND:退款中;NO_REFUND:未退款;YES_REFUND:已退款;}")
    private CertificateOrderReturnOrderStatusEnum returnOrderStatus;

    /**
     * 领取方式:#{MAKE:预约领取;SITE现场领取;}
     */
    @ApiModelProperty(value = "领取方式:#{MAKE:预约领取;SITE现场领取;}")
    private CertificateOrderDrawTypeEnum drawType;

    /**
     * 领取时间
     */
    @ApiModelProperty(value = "领取时间")
    private LocalDateTime drawTime;

    /**
     * 领取预约时间
     */
    @ApiModelProperty(value = "领取预约时间")
    private LocalDateTime drawMakeTime;

    /**
     * 实际支付金额
     */
    @ApiModelProperty(value = "实际支付金额")
    private BigDecimal orderMoney;
    /**
     * 订单状态:#{NO_PAY:未支付;WAIT:支付中;PAY_FAIL:支付失败;PAY_SUCC:支付成功;}
     */
    @ApiModelProperty(value = "订单状态:#{NO_PAY:未支付;WAIT:支付中;PAY_FAIL:支付失败;PAY_SUCC:支付成功;}")
    private CertificateOrderOrderStatusEnum orderStatus;

    /**
     * 制证数量
     */
    @ApiModelProperty(value = "制证数量")
    private Integer certificateNum;


    /**
     * 实际领取单号
     */
    @ApiModelProperty(value = "实际领取单号")
    private String drawNumberEnd;

    /**
     * 实际领取人手机号
     */
    @ApiModelProperty(value = "实际领取人手机号")
    private String drawMobileEnd;

    /**
     * 实际领取人身份证号
     */
    @ApiModelProperty(value = "实际领取人身份证号")
    private String drawIdcardEnd;

    /**
     * 实际领取人姓名
     */
    @ApiModelProperty(value = "实际领取人姓名")
    private String drawNameEnd;



    /**
     * 模糊检索
     */
    private String fuzzySearch;

    /**
     * 公司id集合
     */
    private List<Long> companyIds;
}
